import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/pages/Home'
import Category from '@/pages/JobCategory'
import search from '../components/search'
import Login from '../components/Login'
import Item from '../components/Item'
import My from '../components/my'
import Car from '../components/car'
import MyInfo from '../components/myInfo'
import Chat from '../components/Chat/index'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect: '/home'
    },
    {
      path: '/home',
      name: 'home',
      component: Home
    },
    {
      path: '/chat',
      name: 'chat',
      component: Chat
    },
    {
      path: '/my',
      name: 'my',
      component: My
    },
    {
      path: '/myInfo',
      name: 'myInfo',
      component: MyInfo
    },
    {
      path: '/car',
      name: 'car',
      component: Car
    },
    {
      path: '/item',
      name: 'item',
      component: Item
    },
    {
      path: '/login',
      name: 'login',
      component: Login
    },
    {
      path: '/search',
      name: 'search',
      component: search
    },
    {
      path: '/category',
      name: 'category',
      component: Category
    }
  ]
})
